{% extends 'layout.html' %}


{% block main %}
<ol class="breadcrumb">
    <li><a href="/">管理首页</a></li>
    <li><span>用户首页</span></li>
</ol>
<h3>用户列表</h3>

<table class="table table-hover">

    <tr>
        <th>ID</th>
        <th>用户名</th>
        <th>密码</th>
        <th>是否是管理员</th>
    </tr>
    {% if users.length>0 %}
    {% for user in users %}
    <tr>
        <td>{{user._id.toString()}}</td>
        <td>{{user.username}}</td>
        <td>{{user.password}}</td>
        <td>
            {% if user.isAdmin %}
            是
            {% else %}
            否
            {% endif %}
        </td>
    </tr>
    {% endfor %}
    {% else %}
    <tr>
        <th style="text-align:center" colspan="4">暂无数据</th>
    </tr>
    {% endif %}


</table>

{% endblock %}